home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
GAMES
/
WIMP
/
MINES2
/
!Mines
/
c
/
mouse
< prev
Wrap
Text File
|
1995-04-30
|
2KB
|
78 lines
#include "mouse.h"
void os_mouse2(int *x,int *y,int *b)
{
os_t *t;
os_mouse(x,y,(bits *)b,t);
}
void set_mouse_color_struct(mouse_color_struct *m,int r1,int g1,int b1,int r2,int g2,int b2,int r3,int g3,int b3)
{
m->c1[0]=1;m->c1[1]=25;m->c1[2]=r1;m->c1[3]=g1;m->c1[4]=b1;
m->c2[0]=2;m->c2[1]=25;m->c2[2]=r2;m->c2[3]=g2;m->c2[4]=b2;
m->c3[0]=3;m->c3[1]=25;m->c3[2]=r3;m->c3[3]=g3;m->c3[4]=b3;
}
void get_mouse_color(mouse_color_struct *m)
{
/* os_regset r;
r.r[0]=1;r.r[1]=25;os_swi(OS_ReadPalette,&r);
m->c1[0]=1;m->c1[1]=25;
m->c1[2]=(r.r[2] >> 8);
m->c1[3]=(r.r[2] >> 16);
m->c1[4]=(r.r[2] >> 24);
r.r[0]=2;r.r[1]=25;os_swi(OS_ReadPalette,&r);
m->c2[0]=2;m->c2[1]=25;
m->c2[2]=(r.r[2] >> 8);
m->c2[3]=(r.r[2] >> 16);
m->c2[4]=(r.r[2] >> 24);
r.r[0]=3;r.r[1]=25;os_swi(OS_ReadPalette,&r);
m->c3[0]=3;m->c3[1]=25;
m->c3[2]=(r.r[2] >> 8);
m->c3[3]=(r.r[2] >> 16);
m->c3[4]=(r.r[2] >> 24); */
}
void set_mouse_color(mouse_color_struct *m)
{
/* os_swi2(OS_Word,12,(int)m->c1);
os_swi2(OS_Word,12,(int)m->c2);
os_swi2(OS_Word,12,(int)m->c3); */
}
void set_mouse_box(os_box *box)
{oswordpointer_bbox_block bbox ;
bbox.op = oswordpointer_OP_SET_BBOX ;
bbox.reserved[0] = 0 ;
bbox.reserved[1] = 0 ;
bbox.reserved[2] = 0 ;
bbox.x0 = box->x0 ;
bbox.y0 = box->y0 ;
bbox.x1 = box->x1 ;
bbox.y1 = box->y1 ;
oswordpointer_set_bbox(&bbox);
}
void set_mouse_box_screen(void)
{oswordpointer_bbox_block bbox ;
os_VDU_VAR_LIST(5) list ;
int val[5] ;
list.var[0] = 11;
list.var[1] = 12;
list.var[2] = 4;
list.var[3] = 5;
list.var[4] = -1 ;
os_read_vdu_variables((os_vdu_var_list *)&list,val);
bbox.op = oswordpointer_OP_SET_BBOX ;
bbox.reserved[0] = 0 ;
bbox.reserved[1] = 0 ;
bbox.reserved[2] = 0 ;
bbox.x0 = 0 ;
bbox.y0 = 0 ;
bbox.x1 = val[0]<<val[2] ;
bbox.y1 = val[1]<<val[3] ;
oswordpointer_set_bbox(&bbox) ;
}